// $Id: user.hpp 4 2009-09-02 11:46:48Z joseph2002 $
/*
 * Copyright 2008-2009 Joseph Wu
 * Distributed under the Boost Software License, Version 1.0.
 * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 *
 * For more information, see http://xpcomplus.sourceforge.net
 */

//
// This file may be customized by the end user to define a site and compiler
// specific configuration policy.
//
// Note: The macro name with 'XPCOM_USE_XXX' or 'XPCOM_NO_XXX' will affect not
//       only the user code, but also the library build.
//       The macro name with 'XPCOM_ENABLE_XXX' or 'XPCOM_DISABLE_XXX' will
//       only affect user code.
//

//
// Forces library to be linked as a dll rather than a static library on
// Microsoft Windows.
//
// This macro is used to turn on __declspec(dllimport) modifiers, so that the
// compiler knows which symbols to look for in a dll rather than in a static
// library.
//
// #define XPCOM_DYN_LINK

//
// Use the given XPCOM API version.
//
// Format of the version is a number made from the format of the XPCOM library
// version, which is n1.n2.n3.n4 where nx consists of digits and n3 and n4 can
// be omitted.
//
// Give the version=n1.n2.n3.n4, the version-number is a number that:
//  version-number % 100 is n4
//  version-number / 100 % 100 is n3
//  version-number / 10000 % 100 is n2
//  version-number / 1000000 is n1
//
// For example, version 1.8.0.4 is 1080004 and version 1.9 is 1090000.
//
// #define XPCOM_API_VERSION 1090000

//
// Force using internal API.
//
// Client code must link to libxul instead of libxpcom if internal API is used.
// By default, internal API is not used.
//
// #define XPCOM_USE_INTERNAL_API

//
// Define this if no template instances are to be placed in the library rather
// than users object files.
//
// #define XPCOM_NO_EXTERN_TEMPLATE

//
// Use std::char_traits instead our own.
// Define this may introduce some extra dependencies, for example, msvcpxx.dll
// if you use MSVC.
//
// #define XPCOM_USE_STD_CHAR_TRAITS

//
// Define this will cause the library to throw standard std::exception based
// exception classes under some error conditions.
//
// #define XPCOM_USE_STD_EXCEPTIONS

//
// Define this will use template array_impl and array_data classes.
// Client code can use XPCOM_USE_TEMPLATE_ARRAY_IMPL with library that is not
// built with XPCOM_USE_TEMPLATE_ARRAY_IMPL, but not vice versa.
//
// #define XPCOM_USE_TEMPLATE_ARRAY_IMPL

//
// Define this will use inherited interface_proxy implementation.
// Client code can safely enable or disable this flag with library built with
// either one.
//
// #define XPCOM_USE_INHERITED_INTERFACE_PROXY

//
// By defining this, the library will throw XPCOM exception instead of
// std::bad_alloc on memory allocation failure.  While the std::bad_alloc is
// still catched when translating exceptions.
//
// #define XPCOM_NO_BAD_ALLOC

//
// Disables the iostream routines.
//
// The cost of using standard iostream library is sometimes unacceptable.
// Define this macro will remove all the code which uses iostream library.
//
// #define XPCOM_NO_IOSTREAM

//
// Define this macro will cause XPCOM_ASSERT_PTR throws a xpcom::exception with
// result=NS_ERROR_NULL_POINTER if it detects the pointer is null.
//
// #define XPCOM_ENABLE_ASSERT_PTR_THROW

//
// There is NO mozilla interface which uses [length_is] attribute, currently.
// So default implementation of the library discards the length_is.
// Turn this option on if support of [length_is] is a must.  It will introduce
// some overhead.
//
// #define XPCOM_ENABLE_LENGTH_IS

//
// By default, typedef of XX_ptr, XX_nptr, XX_array will be generated for
// user interfaces, define this to disable it.
//
// #define XPCOM_DISABLE_TYPEDEFS

//
// This will set raw method access control of generated implementation to
// protected.
//
// #define XPCOM_ENABLE_PROTECTED_RAW_METHOD_ACCESS

//
// This will set raw method access control of generated implementation to
// public.
// This macro has higher priority than XPCOM_ENABLE_PROTECTED_RAW_METHOD_ACCESS.
//
// #define XPCOM_ENABLE_PUBLIC_RAW_METHOD_ACCESS

//
// This will cause generated method implementation not to check null pointers
// for output parameters, just make an assertion.
//
// #define XPCOM_DISABLE_METHOD_ARG_CHECKING

//
// This will cause generated method implementation stop translating exception
// to XPCOM result code, so that C++ exception will probably go out of interface
// boundary.
// Use this only when you are building static modules.
//
// #define XPCOM_DISABLE_METHOD_EXCEPTION_TRANSLATION

//
// This will enable new/delete operator of object implementation using XPCOM
// memory manager.
//
// #define XPCOM_ENABLE_OBJECT_OPERATOR_NEW_DELETE

//
// This will put try/catch around deletion of object implementation.
// Normally, destructor should never throw, so you don't need this to be
// enabled.
//
// #define XPCOM_ENABLE_OBJECT_TRY_CATCH_DELETION

//
// This will enable client code to set custom new_instance handler for module
// component (by default, it uses new T() ).
// The macro is not needed typically, and will add some overhead if enabled,
// because boost::function will be used to store the function objects.
//
// #define XPCOM_ENABLE_CUSTOM_NEW_INSTANCE

//
// This will cause XPCOM_MODULE macro to define static module.
//
// #define XPCOM_ENABLE_STATIC_MODULE

//
// Override the limit of interfaces that an object can implement.
// By default, this value equals to BOOST_MPL_LIMIT_VECTOR_SIZE
//
// #define XPCOM_LIMIT_OBJECT_INTERFACE_SIZE 20

//
// Override the limit of interfaces that an aggregation can implement.
// By default, this value equals to BOOST_MPL_LIMIT_VECTOR_SIZE
//
// #define XPCOM_LIMIT_AGGREGATE_INTERFACE_SIZE 20

//
// Override the limit of components that a module can have.
// By default, this value equals to BOOST_MPL_LIMIT_VECTOR_SIZE
//
// #define XPCOM_LIMIT_MODULE_COMPONENT_SIZE 20
